#include "halfedge.h"
#include "edge.h"
#include <iostream>


HalfEdge::HalfEdge()
{

}

void HalfEdge::setWloop(Loop* _loop)
{
	wloop = _loop;
}

void HalfEdge::setNxt(HalfEdge* _he)
{
	nxt = _he;
}

void HalfEdge::setPrv(HalfEdge* _he)
{
	prv = _he;
}

void HalfEdge::setVtx(Vertex* _vertex)
{
	vtx = _vertex;
}
void HalfEdge::setEdg(Edge* _edge)
{
	edg = _edge;
}

Loop* HalfEdge::getLoop()
{
	return wloop;
}

HalfEdge* HalfEdge::mate()
{
	if ( this == this->edg->getHe1() )
	{
		return this->edg->getHe2();
	}
	else
	{
		return this->edg->getHe1();
	}
}
HalfEdge* HalfEdge::getNxt()
{
	return nxt;
}
Edge* HalfEdge::getEdg()
{
	return edg;
}
HalfEdge* HalfEdge::getPrv()
{
	return prv;
}
Vertex* HalfEdge::getVtx()
{
	return vtx;
}
